<template>
	<view class="">
		<view class="flex pf right0 p20 z-index9  radius100 radius-r0 bg-fff bottom80"
			@click="$jump('/pages/my/team/history')">
			<u-icon name="order" size="40" :color="$zs"></u-icon>
			<view class="ml20">历史记录</view>
		</view>
		<view class="bg-fff p20 ">
			<u-search v-model="keyword"></u-search>
		</view>
		<view class="p30">
			<view class="pt100" v-if="!list.length">
				<u-empty></u-empty>
			</view>
			<view class="p20 bg-fff radius20 mb20" v-for="(item,index) in list" :key="index"
				@click="$jump('/pages/my/team/info',{agency_id:item.id})">
				<masterInfo :data="item" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				page: 1,
				keyword:''
			};
		},
		watch: {
			keyword() {
				this.$u.debounce(this.getList, 800)
			}
		},
		onShow() {
			this.getList()
		},
		onReachBottom() {
			this.getList('down')
		},
		methods: {
			getList(e) {
				e == 'down' ? this.page++ : this.page = 1
				let params = {
					page: this.page,
					keyword:this.keyword
				}
				this.$request('/master/agency/notJoinList', params).then(res => {
					let list = res.data.data
					e == 'down' ? this.list.push(...list) : this.list = list
				})
			},
		}
	}
</script>

<style>

</style>